
# 双色球规则：
# 红球在1-33中随机选6个， 蓝球在1-16中随机选一个
# 输出： 排序好的红球， 蓝球
import random




def generateRedBlueBalls(n):

    list1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
             30, 31, 32, 33]
    list2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]

    group = []
    for x in range(0, n):
        list = []
        for i in range(1, 7):
            red_index = random.randint(0, len(list1) - 1)
            red_ball = list1[red_index]
            list.append(red_ball)
            list1.remove(red_ball)
        list.sort()

        blue_index = random.randint(0, len(list2) - 1)
        blue_ball = list2[blue_index]
        list.append(blue_ball)

        string = ','.join(str(x) for x in list)
        group.append(string)
    print(group)



generateRedBlueBalls(3)